package com.baichang.taoshunda.dao.impl;

import com.baichang.framework.dao.impl.BaseDaoImpl;
import com.baichang.taoshunda.dao.OrderDetailsReasonDao;
import com.baichang.taoshunda.entity.OrderDetailsReason;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author wsl
 * @date 2018/11/7
 * @company codingApi
 * @description
 */
@Repository
public class OrderDetailsReasonDaoImpl extends BaseDaoImpl<OrderDetailsReason> implements OrderDetailsReasonDao  {
    @Override
    public List<Map<String, Object>> findReasonByDetailsId(Integer orderDetailsId) {
        String sql="SELECT d.id, d.reason_img, d.reason_refund, d.order_details_id, d.type , " +
                "d.created FROM t_order_details_reason d WHERE d.order_details_id = ? order by id desc";
        return queryForMapList(sql,orderDetailsId);
    }
}
